<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>修改博文</title>
	<link rel="stylesheet" href="/Public/Admin/Css/common.css" />
	<script type="text/javascript" src='/Public/Admin/Js/jquery-1.8.2.min.js'></script>
	<script type="text/javascript" src='/Public/Admin/Js/common.js'></script>
	<script type="text/javascript" src="/Public/Admin/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/Public/Admin/ueditor/ueditor.all.min.js"></script>
	<script>
    $(function(){
        var ue = UE.getEditor('container',{
            serverUrl :'<?php echo U('Admin/Blog/ueditor');?>'
        });
    })
    </script>
</head>
<body>
	<div class='status'>
		<span>博文修改</span>
	</div>
	<form action="<?php echo U('runEditBlog');?>" method='post'>
		<table class="table">
			<tr>
				<td align='right' width='10%'>标题：</td>
				<td width='20%'><input type="text" name="title" style="width: 300px;" value="<?php echo ($blog["title"]); ?>" /></td>
				<td align='center' width='10%' value="" >作者：</td>
				<td width='25%'><input type="text" value="<?php echo ($blog["author"]); ?>" name="author" /></td>
				<td align='center' width='10%'>点击次数：</td>
				<td width='25%'><input type="text" value="<?php echo ($blog["click"]); ?>" name="click" /></td>
			</tr>
			<tr>
				<td colspan='6'>
					<script id="container" type="text/plain" style="height:200px;"><?php echo (htmlspecialchars_decode($blog['content'])); ?></script>
				</td>
			</tr>
			<tr>
				<td align="center">关键词:</td>
				<td><input type="text" style="width: 300px;" name="tags" value="<?php echo ($blog["tags"]); ?>" /></td>
				<td align='center'>所属分类：</td>
				<td>
					<select name="cid">
						<?php if(is_array($cate)): foreach($cate as $key=>$v): ?><option value="<?php echo ($v["id"]); ?>" <?php if($v["id"] ==$blog["cid"]): ?>selected="selected"<?php endif; ?> ><?php echo ($v["html"]); echo ($v["name"]); ?></option><?php endforeach; endif; ?>
					</select>
				</td>
				<td align='center'>博文属性：</td>
				<td>
					<?php if(is_array($attr)): foreach($attr as $key=>$v): ?><label style="margin-right: 10px;">
						<input type="checkbox" name="type" value="<?php echo ($v["id"]); ?>" <?php if($v["id"] ==$blog["type"]): ?>checked="checked"<?php endif; ?> /><?php echo ($v["name"]); ?>&nbsp;&nbsp;
					</label><?php endforeach; endif; ?>
				</td>
			</tr>
			<tr>
				<td align="center">描述:</td>
				<td colspan="5" align="center">
					<textarea name="description" cols="150" rows="1"><?php echo ($blog["description"]); ?></textarea>
				</td>
			</tr>
			<tr>
				<td colspan='6' align="center">
					<input type="hidden" value="<?php echo ($blog["id"]); ?>" name="id" />
					<input class="big-btn" type="submit" value="修改文章" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>